package com.btpj.module_search.data.remote

import com.btpj.jetpack.entity.ApiResponse
import com.btpj.module_search.data.entity.HotKeyModel
import com.btpj.module_search.data.entity.SearchResultModel
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path
import retrofit2.http.Query

interface SearchApi {

    @GET("/hotkey/json")
    suspend fun getHotKey(): ApiResponse<MutableList<HotKeyModel>>


    @POST(" /article/query/{page}/json")
    suspend fun search(
        @Path("page") page: Int,
        @Query("k") key: String
    ): ApiResponse<SearchResultModel>
}